package com.giibpt.model.entities;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

@Entity
@GenericGenerator(
		name = "alerta",
		strategy = "org.hibernate.id.enhanced.SequenceStyleGenerator",
		parameters = {
				@Parameter(name="sequence_name", value="alerta_sequence"),
				@Parameter(name="initial_value", value="1"),
				@Parameter(name="increment_size", value="1")
		}
)

public class Alerta {
	Long idAlerta;
	Etiqueta etiqueta;
	Lector lector;
	TipoAlerta tipoAlerta;
	
	@Id
	@GeneratedValue(generator="alerta")
	public Long getIdAlerta() {
		return idAlerta;
	}
	@ManyToOne
	public Etiqueta getEtiqueta() {
		return etiqueta;
	}
	@ManyToOne
	public Lector getLector() {
		return lector;
	}
	@ManyToOne
	public TipoAlerta getTipoAlerta() {
		return tipoAlerta;
	}
	public void setIdAlerta(Long idAlerta) {
		this.idAlerta = idAlerta;
	}
	public void setEtiqueta(Etiqueta etiqueta) {
		this.etiqueta = etiqueta;
	}
	public void setLector(Lector lector) {
		this.lector = lector;
	}
	public void setTipoAlerta(TipoAlerta tipoAlerta) {
		this.tipoAlerta = tipoAlerta;
	}
	
	
	
}
